package com.xuelang.pipeline.client.resource;

import com.xuelang.pipeline.client.common.result.ApiResult;
import com.xuelang.pipeline.client.resource.dto.NamespaceDTO;
import com.xuelang.pipeline.client.resource.dto.NamespaceVO;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import jakarta.validation.Valid;
import java.util.List;

/**
 * 命名空间服务接口
 *
 * @author xiwen.zxg
 * @since 2024/5/28
 */
public interface INamespaceService {

    /**
     * 查询命名空间列表(有过滤条件)
     *
     * @param namespaceVO
     * @return
     */
    @PostMapping(value = "/list", produces = "application/json;charset=utf-8")
    ApiResult<List<NamespaceDTO>> conditionalNamespaceList(@RequestBody @Valid NamespaceVO namespaceVO);

    /**
     * 新增命名空间
     *
     * @param namespaceVO
     * @return
     */
    @PostMapping(value = "", produces = "application/json;charset=utf-8")
    ApiResult<Boolean> addNamespace(@RequestBody @Valid NamespaceVO namespaceVO);


    /**
     * 删除命名空间
     *
     * @param namespaceVO
     * @return
     */
    @DeleteMapping(value = "", produces = "application/json;charset=utf-8")
    ApiResult<Boolean> deleteNamespace(@RequestBody @Valid NamespaceVO namespaceVO);

}
